<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="alert alert-info" style="background-color:#ccc !important;border: 0px;"><span class="label" style="font-size: initial;" >客户信息</span></div>


     <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label for="c-avatar" class="control-label col-xs-12 col-sm-4">{:__('Avatar')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[avatar]" type="text" value="">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                        <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                    </div>
                    <span class="msg-box n-right" for="c-avatar"></span>
                </div>
                <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
            </div>
        </div>
        <div class="col-xs-8 col-sm-4">
            <label for="c-wxmanage" class="control-label col-xs-12 col-sm-4">{:__('是否为合伙人')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:build_radios('row[is_investor]', ['0'=>__('否'), '1'=>__('是')], 0)}
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label for="c-nickname" class="control-label col-xs-12 col-sm-4">{:__('姓名')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-nickname" data-rule="required" class="form-control" name="row[nickname]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label for="c-username" class="control-label col-xs-12 col-sm-4">{:__('账号')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-username" data-rule="required" class="form-control" name="row[username]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label class="control-label col-xs-12 col-sm-4">{:__('归属门店')}:</label>
            <div class="col-xs-12 col-sm-6">
                <input  id="c-shop_id" type="text" data-rule="required" class="form-control selectpage" data-source="store/shop/index" placeholder="选择门店" data-search-field="shopname" data-field="shopname" name="row[shop_id]"/>
            </div>
        </div> 
    </div>

    <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label class="control-label col-xs-12 col-sm-4">{:__('Gender')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:build_radios('row[gender]', ['1'=>__('Male'), '0'=>__('Female')], 0)}
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label for="c-code" class="control-label col-xs-12 col-sm-4">{:__('客户编号')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-code" class="form-control" name="row[code]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label class="control-label col-xs-12 col-sm-4">{:__('客户来源')}:</label>
            <div class="col-xs-12 col-sm-4">
                {:build_select('row[juser_id]', $juserList, 0, ['class'=>'form-control'])}
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label for="c-remarkname" class="control-label col-xs-12 col-sm-4">{:__('备注名')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-remarkname"  class="form-control" name="row[remarkname]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label class="control-label col-xs-12 col-sm-4">{:__('营销顾问')}:</label>
            <div class="col-xs-12 col-sm-4">
                {:build_select('row[marketing]', $marketingList, 0, ['class'=>'form-control', 'required'=>''])}
            </div>
        </div>
    </div>

    <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label for="c-promoter" class="control-label col-xs-12 col-sm-4">{:__('推广员')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-promoter" class="form-control" name="row[promoter]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label for="c-jointime" class="control-label col-xs-12 col-sm-4">{:__('绑定时间')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-jointime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[jointime]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label for="c-group_id" class="control-label col-xs-12 col-sm-4">{:__('Group')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-group_id"  data-source="user/group/index" class="form-control selectpage" name="row[group_id]" type="text" value="1">
            </div>
        </div>
       
    </div>
    <div class="alert alert-info" style="background-color:#ccc !important;border: 0px;"><span class="label" style="font-size: initial;" >基本档案</span></div>
    <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label for="c-mobile" class="control-label col-xs-12 col-sm-4">{:__('联系电话')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-mobile" data-rule="mobile" class="form-control" name="row[mobile]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label for="c-wechat" class="control-label col-xs-12 col-sm-4">{:__('微信号')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-wechat"  class="form-control" name="row[wechat]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label for="c-remark" class="control-label col-xs-12 col-sm-4">{:__('备注')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-remark" class="form-control" name="row[remark]" type="text" value="">
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label for="c-birthday" class="control-label col-xs-12 col-sm-4">{:__('Birthday')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-birthday" data-rule="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[birthday]" type="text" value="">
            </div>
        </div>

        <div class="col-xs-4 col-sm-4">
            <label for="c-birthday" class="control-label col-xs-12 col-sm-4">{:__('地址')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class='control-relative'><input id="c-city" class="form-control" data-toggle="city-picker" name="row[city]" type="text" value=""></div>
            </div>
        </div>

        <div class="col-xs-4 col-sm-4">
            <label for="c-birthday" class="control-label col-xs-12 col-sm-4">{:__('详细地址')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-address" class="form-control" name="row[address]" type="text" value="">
            </div>
        </div>
        
    </div>

    <div class="form-group">
        <div class="col-xs-4 col-sm-4">
            <label for="c-password" class="control-label col-xs-12 col-sm-4">{:__('Password')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-password" data-rule="password" class="form-control" name="row[password]" type="password" value=""  autocomplete="new-password" />
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label for="c-password" class="control-label col-xs-12 col-sm-4">{:__('备注')}:</label>
            <div class="col-xs-12 col-sm-4">
                <input id="c-remark" class="form-control" name="row[remark]" type="text" value="">
            </div>
        </div>
       
    </div>
    <div class="form-group">
       
        {if condition="$isbcauth" }
        <div class="col-xs-4 col-sm-4">
            <label class="control-label col-xs-12 col-sm-4">{:__('所属员工')}:</label>
            <div class="col-xs-12 col-sm-4">
                {:build_select('row[staff_id]', $staffList, 0, ['class'=>'form-control', 'required'=>''])}
            </div>
        </div>
        <div class="col-xs-4 col-sm-4">
            <label class="control-label col-xs-12 col-sm-4">{:__('所属服务商')}:</label>
            <div class="col-xs-12 col-sm-4">
                {:build_select('row[service_id]', $serviceList, 0, ['class'=>'form-control', 'required'=>''])}
            </div>
        </div>
        <div class="col-xs-8 col-sm-4">
            <label for="c-wxmanage" class="control-label col-xs-12 col-sm-4">{:__('仁客云助手权限')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:build_radios('row[wxmanage]', $wxmanageList)}
            </div>
        </div>
       
       {/if} 
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-4"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
